<include file="Public/head"/>
<link href="__PUBLIC__/qwadmin/css/shen/shen.css" rel="stylesheet" type="text/css" />
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
<style>
 body tr td{margin: 0px;padding: 0px;}
        td{height: 40px;text-align: center;border-top: 0px; border-left: 0px;}

        #box{display: flex;align-items: center;width: 100%;justify-content: center;margin-top:100px; }
        #timer{display: flex;flex-direction: row;}
        .txt{width: 98%;height: 98%;border: 0px;}
#xuanxiang button{
    margin:30px 45px;
    width:100px;
    height:50px;
}
</style>
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }

    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                 <div class="container-fluid">
                      <div class="row">
                            <form class="form-inline" >
                                <!-- <a class="btn btn-info" href="{:U('add')}" value="">新增</a> -->
                                <label class="inline"><b style="font-size:17px;">派车类别选择:</b></label>&nbsp
                                <select name="field" class="form-control" style="width:15%;" id="select">
                                    <!-- <option>请选择...</option> -->
                                    <option style="font-size:17px;">市(内)派车</option>
                                    <option style="font-size:17px;">市(外)派车</option>
                                    <!-- <option>招待用品领用</option> -->
                                    <!-- <option >急性物资</option> -->
                                    <!-- <option></option> -->
                                </select>
                                
                               <!--  <button type="submit" class="btn btn-purple btn-sm">
                                    <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
                                    Search
                                </button> -->
                            </form>
                        </div>
                    </div>

                    <div id="box" class="n">
                    <form action="{:U('Che/cheadd')}" enctype="multipart/form-data" method="post">
                    <input type="hidden" name="type" value="1" class="txt" />
                      <table border="1" width="800px" >
                        <h2 style="text-align:center;">市<b style="color:#FFA500;">(内)</b>派车申请表</h2><br><br>
                        <thead>
                        </thead>

                        <tbody>
                            <tr>
                              <td>用车人姓名:</td>
                              <td><input type="text" name="uname" class="txt" /></td>
                              <td>部门:</td>
                              <td><input type="text" name="ment" class="txt" /></td>
                            </tr>

                            <tr>
                              <td>联系方式:</td>
                              <td><input type="text" name="tel" class="txt" /></td>
                              <td>用车时间:</td>
                              <td id='timer'><input type="date" class="txt" name="k_time"  style="width:50%;height: 98%" /><input type="time" class="txt" name="min" style="width:50%;height: 98%"/></td>
                            </tr>

                            <tr>
                              <td>出发地点:</td>
                              <td><input type="text" name="c_place" class="txt" /></td>
                              <td>目的地:</td>
                              <td><input type="text" name="d_place" class="txt" /></td>
                            </tr>


                            <tr>
                              <td>用车事由:</td>
                              <td colspan="3"><input type="text" name="content" class="txt" /></td>
                            </tr>
                            <tr>
                              <!-- <td>用车事由:</td> -->
                              <td colspan="4"><button class="btn-info" style="width:150px;height:35px;font-size:16px;">提交申请</button></td>
                            </tr>
                        </tbody>

                        <tfoot>
                        </tfoot>
                      </table>
                    </form>
                    </div>
                   
         







                    <div id="box" class="w" style="display:none;">
                    <form action="{:U('Che/cheadd')}" enctype="multipart/form-data" method="post">
                    <input type="hidden" name="type" value="2" class="txt" />
                      <table border="1" width="800px" >
                        <h2 style="text-align:center;">市<b style="color:#000;">(外)</b>派车申请表</h2><br><br>
                        <thead>
                        </thead>

                        <tbody>
                            <tr>
                              <td>用车人姓名:</td>
                              <td><input type="text" name="uname" class="txt" /></td>
                              <td>部门:</td>
                              <td><input type="text" name="ment" class="txt" /></td>
                            </tr>

                            <tr>
                              <td>联系方式:</td>
                              <td><input type="text" name="tel" class="txt" /></td>
                              <td>用车时间:</td>
                              <td id='timer'><input type="date" class="txt" name="k_time"  style="width:50%;height: 98%" /><input type="time" class="txt" name="min" style="width:50%;height: 98%"/></td>
                            </tr>

                            <tr>
                              <td>出发地点:</td>
                              <td><input type="text" name="c_place" class="txt" /></td>
                              <td>目的地:</td>
                              <td><input type="text" name="d_place" class="txt" /></td>
                            </tr>


                            <tr>
                              <td>用车事由:</td>
                              <td colspan="3"><input type="text" name="content" class="txt" /></td>
                            </tr>
                            <tr>
                              <!-- <td>用车事由:</td> -->
                              <td colspan="4"><button class="btn-info" style="width:150px;height:35px;font-size:16px;">提交申请</button></td>
                            </tr>
                        </tbody>

                        <tfoot>
                        </tfoot>
                      </table>
                    </form>
                    </div>












              


            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/js/laydate/laydate.js"></script>
                <div id="xuanxiang" style="display:none;">
                    <button class="btn-info" onclick="nei()">市内派车</button>
                    <!-- <button class="btn-warning" onclick="lao()">劳保用品</button> -->
                    <button class="btn-success" onclick="wai()">市外派车</button>
    
                </div>
<script>


 //给下拉框设置事件
    $("select").change(function(){
        
        var name = this.value;
        // console.log(name);
        if (name == '市(外)派车') {
            // $("#jixing").css("display",'flex');
            // $("#lao").show(500);
            // $("#ban").hide();
            // $("#zhao").hide();
            // // $("#jixing").css("display",'flex');
            $('.n').css("display",'none');
            $('.w').css("display",'flex');
        }else{
           if (name == '市(内)派车') {
                $('.n').css("display",'flex');
                $('.w').css("display",'none');
           }           
        }

    })


// // ------------------------------------------申请派车 


function scshen()
{

     //询问框
        layer.confirm('确定发起申请么,(ง •̀_•́)ง？', {
          btn: ['确定','取消'] //按钮
        }, function(){
            $.ajax({
                 type: "POST",
                 url:"{:U('Che/cheadd')}",
                 data:$('#scformID').serialize(),// 要提交的表单 
                 beforeSend:function(){
                  layer.load(0, {shade: false});
                },
                 success: function(msg) {
                    if (msg == 1111) {
                        layer.msg('已提交,请等待审批!', {icon: 1});
                        // history.go(0); 
                    }else{
                        layer.msg('申请失败,请重新再试!');
                    }
                 },
                 complete: function() {
                     layer.closeAll('loading');
                }
            });
         
        }, function(){
            layer.msg(' (｡・`ω´･) 再见');
        });

     // $.ajax({
     //     type: "POST",
     //     url:"{:U('Shen/cheadd')}",
     //     data:$('#scformID').serialize(),// 要提交的表单 
     //     success: function(msg) {
     //       if (msg == 1111) {
     //            layer.confirm('确定申请么？', {
     //            btn: ['确定'] //按钮
     //        }, function(){
     //            layer.msg('已提交,请等待审批!', {icon: 1});
     //        }, function(){
     //            layer.msg('已取消', {
     //            time: 20000, //20s后自动关闭
     //            // btn: ['明白了', '知道了']
     //        });
     //        });
     //        }else{
     //            layer.msg('申请失败,请重新再试!');
     //        }
     //     }
     // });
}
function swshen()
{
     $.ajax({
         type: "POST",
         url:"{:U('Che/cheadd')}",
         data:$('#swformID').serialize(),// 要提交的表单 
         beforeSend:function(){
                   layer.load(0, {shade: false});
                },
         success: function(msg) {
           if (msg == 1111) {
                layer.confirm('确定申请么？', {
                btn: ['确定'] //按钮
            }, function(){
                layer.msg('已提交,请等待审批!', {icon: 1});
                // history.go(0); 
            }, function(){
                layer.msg('已取消', {
                time: 20000, //20s后自动关闭
                // btn: ['明白了', '知道了']
            });
            });
            }else{
                layer.msg('申请失败,请重新再试!');
            }
         },
          complete: function() {
                     layer.closeAll('loading');
                }

     });
}

// // ------------------------------------------申请派车 END











</script>



<!-- ---------------------------申请市内派车------------------------------ -->
<div id="sc" style="display:none;">
    <form action="" id='scformID'>
        <input type="hidden" name="type" value="1">
        <!-- <div class="row"> -->
       
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">出发地点:</b></label>
            <input type="text" class="form-control" name="c_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">到达地点:</b></label><br><br>
            <input type="text" class="form-control"  name="d_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">            
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车时间:</b></label><br><br>
            <input onClick="laydate()" name="k_time" style="margin-left:-20px;">&nbsp&nbsp &nbsp &nbsp &nbsp <b>至</b> &nbsp<input onClick="laydate()" name="e_time">
        </div><br>
        <input type="hidden" name="type" value="1">
       <!--  <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">共计天数:</b></label>
            <input type="text" class="form-control" name="day" id="exampleInputEmail1" placeholder="请输入天数...." style="width:90%;">
        </div><br> -->
         <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车缘由:</b></label>
            <textarea class="form-control" rows="3" name="content" style="width:90%;margin-left:30px;" placeholder="请输入缘由...."></textarea>
        </div>
                           
                            

        <div onclick="scshen()" style="width:100px;height:30px;background-color:#FFA500;border:1px solid #ccc;border-radius:50px;text-align:center;line-height:30px;color:#fff;float:left; bottom: 0;margin-left:42%;margin-top:5%;cursor:pointer;"><b>申请</b></div>
        <!-- </div>　 -->
    </form>
</div>
<!-- ---------------------------申请市内派车   END------------------------------ -->

<!-- ---------------------------申请市外派车------------------------------ -->
<div id="sw" style="display:none;">
    <form action="" id='swformID'>
        <input type="hidden" name="type" value="1">
        <!-- <div class="row"> -->
       
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">出发地点:</b></label>
            <input type="text" class="form-control" name="c_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">到达地点:</b></label><br><br>
            <input type="text" class="form-control"  name="d_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">            
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车时间:</b></label><br><br>
            <input onClick="laydate()" name="k_time" style="margin-left:-20px;">&nbsp&nbsp &nbsp &nbsp &nbsp <b>至</b> &nbsp<input onClick="laydate()" name="e_time">
        </div><br>
        <input type="hidden" name="type" value="2">
       <!--  <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">共计天数:</b></label>
            <input type="text" class="form-control" name="day" id="exampleInputEmail1" placeholder="请输入天数...." style="width:90%;">
        </div><br> -->
         <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车缘由:</b></label>
            <textarea class="form-control" rows="3" name="content" style="width:90%;margin-left:30px;" placeholder="请输入缘由...."></textarea>
        </div>
                           
                            

        <div onclick="swshen()" style="width:100px;height:30px;background-color:#FFA500;border:1px solid #ccc;border-radius:50px;text-align:center;line-height:30px;color:#fff;float:left; bottom: 0;margin-left:42%;margin-top:5%;cursor:pointer;"><b>申请</b></div>
        <!-- </div>　 -->
    </form>
</div>
<!-- ---------------------------申请市外派车   END------------------------------ -->














</body>
</html>
